package pro.cherish.knowledgeelk.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 创建人：cherish
 * @version 版本号：V1.0
 * <p>
 * ***************************修订记录************************************
 * 2019-10-18 cherish 创建该类功能。
 * **********************************************************************
 * </p>
 * @ClassName 类名：TestController
 * @Description 功能说明：
 * <p>
 * TODO
 * </p>
 * **********************************************************************
 * @date 创建日期： 2019-10-18 cherish
 */
@RestController("/test")
@Slf4j
public class TestController {

    final Logger logger = LoggerFactory.getLogger(TestController.class);

    @RequestMapping("/test1")
    public String test(String msg) {
        logger.info(msg);
        // logger.warn("This is a warn message!");
        // logger.error("This is error message!");
        return "test1！:";
    }

    @RequestMapping("/test2")
    public String test2(String msg) {
        log.info(msg);
        log.warn("This is a warn message!");
        log.error("This is error message!");
        return "test1！:";
    }

}
